package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DetectionResultMapper;
import com.ruoyi.system.domain.DetectionResult;
import com.ruoyi.system.service.IDetectionResultService;
import com.ruoyi.common.core.text.Convert;

/**
 * 检测结果数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-22
 */
@Service
public class DetectionResultServiceImpl implements IDetectionResultService 
{
    @Autowired
    private DetectionResultMapper detectionResultMapper;

    /**
     * 查询检测结果数据
     * 
     * @param resultId 检测结果数据主键
     * @return 检测结果数据
     */
    @Override
    public DetectionResult selectDetectionResultByResultId(Long resultId)
    {
        return detectionResultMapper.selectDetectionResultByResultId(resultId);
    }

    /**
     * 查询检测结果数据列表
     * 
     * @param detectionResult 检测结果数据
     * @return 检测结果数据
     */
    @Override
    public List<DetectionResult> selectDetectionResultList(DetectionResult detectionResult)
    {
        return detectionResultMapper.selectDetectionResultList(detectionResult);
    }

    /**
     * 新增检测结果数据
     * 
     * @param detectionResult 检测结果数据
     * @return 结果
     */
    @Override
    public int insertDetectionResult(DetectionResult detectionResult)
    {
        return detectionResultMapper.insertDetectionResult(detectionResult);
    }

    /**
     * 修改检测结果数据
     * 
     * @param detectionResult 检测结果数据
     * @return 结果
     */
    @Override
    public int updateDetectionResult(DetectionResult detectionResult)
    {
        return detectionResultMapper.updateDetectionResult(detectionResult);
    }

    /**
     * 批量删除检测结果数据
     * 
     * @param resultIds 需要删除的检测结果数据主键
     * @return 结果
     */
    @Override
    public int deleteDetectionResultByResultIds(String resultIds)
    {
        return detectionResultMapper.deleteDetectionResultByResultIds(Convert.toStrArray(resultIds));
    }

    /**
     * 删除检测结果数据信息
     * 
     * @param resultId 检测结果数据主键
     * @return 结果
     */
    @Override
    public int deleteDetectionResultByResultId(Long resultId)
    {
        return detectionResultMapper.deleteDetectionResultByResultId(resultId);
    }
}
